home *** CD-ROM | disk | FTP | other *** search
/ PC User 2003 December / Australian PC User - December 2003 (CD2).iso / software / apps / files / dwmx2k4.exe / Disk1 / data1.cab / Configuration_En / Objects / Head / Meta.js < prev    next >
Encoding:
JavaScript  |  2003-09-05  |  1.1 KB  |  39 lines

  1. // Copyright 2000, 2001, 2002, 2003 Macromedia, Inc. All rights reserved.
  2.  
  3. //---------------   GLOBAL VARIABLES   ---------------
  4.  
  5. var helpDoc = MM.HELP_objMeta;
  6.  
  7. //---------------     API FUNCTIONS    ---------------
  8.  
  9. function isDOMRequired() { 
  10.     // Return false, indicating that this object is available in code view.
  11.     return false;
  12. }
  13.  
  14. function objectTag() {
  15.   var theForm = document.theForm;
  16.   var retVal = "";
  17.   var content = "";
  18.   var selInd = theForm.metaAttribute.selectedIndex;
  19.   var metaAttribute = (selInd == 0) ? 'name' : 'http-equiv';
  20.   
  21.   // Convert any returns in the Content to spaces before inserting.
  22.   // If this replacement results in double spaces, convert to 
  23.   // single spaces.
  24.   content = theForm.Content.value.replace(/[\n\r]/g," ");
  25.   content = content.replace(/\s+/g, " ");
  26.   
  27.   retVal='<meta ' + metaAttribute + '="' + 
  28.     theForm.metaValue.value + '" Content="' + content +
  29.     '">';    
  30.  
  31.   return retVal;
  32. }
  33.  
  34. //---------------    LOCAL FUNCTIONS   ---------------
  35.  
  36. function initializeUI(){
  37.   document.theForm.metaValue.focus(); //set focus in Value text field
  38. }
  39.